﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="InterLinq.Test"
                   namespace="InterLinq.Test"  default-lazy="false">
  <class name="WPFOrder" table="tblWPFOrder">
    <id name="Id">
      <generator class="guid" />
    </id>
    <property name="Name" />
    <list name="OrderPositions" table="tblWPFOrderPosition">
      <key column="order_id"/>
      <index column="posn"/>
      <composite-element class="WPFOrderPosition" >
        <property name="Count" />
        <many-to-one name="Product" column="idProduct" class="WPFProduct" />
      </composite-element>
    </list>
  </class>
  <class name="WPFProduct" table="tblWPFProduct">
    <id name="Id">
      <generator class="guid" />
    </id>
    <property name="Name"/>
    <property name="Price"/>
  </class>
</hibernate-mapping>